package dancrawler.client.gamecmd;

import dancrawler.common.Misc;
import dancrawler.client.Client;
import dancrawler.proto.cmd.CmdHandler;
import dancrawler.server.netMsg;

/**
 *
 */
public class CmdRmPlayer extends CmdHandler {
    protected int[] args = {2};

    private Client client;

    public CmdRmPlayer(Client client)
    {
        this.client = client;
    }

    @Override
    public void handleCmd(netMsg msg) {
        client.getRec().rmPlayer(Misc.bytesToShort(msg.getArgs()[0]));
    }

    @Override
    public int getNumArgs() {
        return args.length;
    }

    @Override
    public int getId() {
        return 15;
    }

    @Override
    public int getArgSize(int n) {
        if(n < 0 || n >= args.length)
        {
            return 0;
        }
        return args[n];
    }

    @Override
    public CmdHandler getHandler() {
        return this;
    }

}
